<meta charset = "utf-8"/>
<script>
var strs = ["America","Greece","Britain","Canada","China","Egypt"];
var count = 0;
for(var i =0;i<strs.length;i++){
	if(strs[i].indexOf("a")>=0||strs[i].indexOf("A")>=0){
		count++;
	}
}
alert("America,Greece,Britain,Canada,China,Egypt中包含a或A的字符串个数是：" + count);
</script>